import 'package:dmz/business/home/controller/home_main_controller.dart';
import 'package:dmz/business/home/model/moto_model.dart';
import 'package:dmz/business/home/widgets/home_widgets.dart';

import 'package:flutter/material.dart';

class HomeMotoWidget extends StatelessWidget {
  final MotoModel model;
  final Function(HomeMotoAction type, {int? other}) clickAction;
  const HomeMotoWidget(
      {super.key, required this.clickAction, required this.model});

  @override
  Widget build(BuildContext context) {
    return Stack(alignment: Alignment.topCenter, children: [
      HomeWidgets.positionWidget(clickAction, data: model),
      Container(
          color: Colors.transparent,
          child: Column(children: [
            HomeWidgets.topWidget(context, clickAction, data: model),
            const Expanded(child: SizedBox()),
            HomeWidgets.operateWidget(context, clickAction,
                isMoto: true, model: model),
          ])),
      HomeWidgets.typeIcons(model, clickAction)
    ]);
  }
}
